Harden shared CI against transient failures - #437
Conversation
-->
✱ stlc build✅ go code · compare
✅ python code · compare
✅ typescript code · compare
Diagnostics: ❗ 0 new / 1 total error, 💡 0 new / 5 total note
Build metadata
This comment is auto-generated by stlc and is kept up to date as you push. |
| func TestBridgeNameForTestSubnet(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| first, err := testBridgeNameForSubnet("10.200.1.0/24") | ||
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| second, err := testBridgeNameForSubnet("10.200.2.0/24") | ||
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| if first != "hmc801" || second != "hmc802" || first == second { |
There was a problem hiding this comment.
this looks like it's just trying two options but that would only decrease but not resolve the issue
| bridgeName, err = testBridgeNameForSubnet(subnet) | ||
| if err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
Orphan bridges can block subnets
Medium Severity
Bridge names are now a fixed function of the leased subnet, but subnet selection only skips leases and overlapping routes. An orphan hm* bridge with no lease and no route still maps to the same name on the next lease of that subnet, so createBridge can fail when the interface already exists without the expected address. The old seed-based names avoided reusing that interface name.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 7e3924e. Configure here.
| sudo cp --reflink=auto --sparse=always "$existing" "$source" | ||
| sudo chmod 0444 "$source" | ||
| fi | ||
| fi |
There was a problem hiding this comment.
Recovery find can abort CI
Medium Severity
The Windows fixture staging path is best-effort: missing source only skips the symlink. The new sudo find runs in that same path under Actions’ default bash -e, so a missing /mnt/data/home or any find error fails the whole step and blocks later tests that do not need the fixture.
Reviewed by Cursor Bugbot for commit 44df562. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 5 total unresolved issues (including 4 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1202fd1. Configure here.


summary
/cion every test runtests
go test ./lib/instances -run ^TestBridgeNameForTestSubnet$ -count=1git diff --checkNote
Medium Risk
Touches shared self-hosted CI (checkout, fixture copies as root, lint retries) and test Linux networking. Failures could skip Windows tests or leave flaky CI rather than production auth/data paths.
Overview
Hardens shared CI against transient checkout/lint failures, missing Windows VM fixtures, and colliding test network bridges.
Checkout now retries once on failure. SDK lint in STLC generation retries up to three times. Test jobs copy host-provisioned Windows images into
/mnt/data/ci-fixtures/windowsand symlink them under/ci/windows.Test Linux bridges are named from the leased subnet (
hm+ octets) instead of a seed/seq combo, so parallel processes no longer share a bridge name.Reviewed by Cursor Bugbot for commit bc23f12. Bugbot is set up for automated code reviews on this repo. Configure here.